package com.dmz.wxcp.wecom.contact.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName(value = "contact")
public class Contact {
    @TableId
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long contactId;
    private String contactName;
    private String companyName;
    private String address;
    private String city;
    private String province;
    private String headimgurl;
    private String openid;
    private Boolean enabled;
    private String detail;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //更新时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    private String mobile;
    private String phone;
    private String photo;
    private String country;
    private String nickname;
    private Boolean sex;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long contactCategoryId;

    @TableField(exist = false)
    private String contactCategoryName;
}
